package com.punch.common.vo.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * OrderAppPageVO-订单列表信息 展示vo
 *
 * @author xiaol
 * @version 1.0.0
 * @since 2020/7/21
 */
@Data
public class OrderAppPageVO implements Serializable {

    /**
     * 主订单id
     */
    @ApiModelProperty(name = "orderId", notes = "主订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * 封面图片
     */
    @ApiModelProperty(name = "courseImg", notes = "封面图片")
    private String courseImg;

    /**
     * 上课时间
     */
    @ApiModelProperty(name = "courseTime", notes = "上课时间")
    private String courseTime;


    /**
     * 课程班级名称
     */
    @ApiModelProperty(name = "courseClassName", notes = "课程班级名称")
    private String courseClassName;

    @ApiModelProperty(name = "courseHourCount", notes = "课时数")
    private Integer courseHourCount;


    @ApiModelProperty(name = "schoolName", notes = "学校")
    @JsonIgnore
    private String schoolName;


    @ApiModelProperty(name = "classRoomName", notes = "教室")
    @JsonIgnore
    private String classRoomName;

    @ApiModelProperty(name = "address", notes = "上课地址")
    private String address;

    /**
     * 订单总金额
     */
    @ApiModelProperty(name = "totalAmount", notes = "总金额")
    private Integer totalAmount;


    @ApiModelProperty(name = "orderStatus", notes = "订单状态</br> " +
            "0待付款(显示立即支付按钮)<br/>" +
            "1-已付款(显示取消按钮)<br/> " +
            "2-已取消<br/> 3-已开班<br/> " +
            "4-已完成")
    private Integer orderStatus;


    @ApiModelProperty(name = "createTime", notes = "订单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private LocalDateTime createTime;


}
